﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="testValid.aspx.cs" Inherits="WebApplication1.TestJs.testValid" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../Scripts/Valid.js" type="text/javascript"></script>
    
    <style type="text/css">
        .formtips
        {
            margin: 2px;
            padding: 2px;
        }
        .onError
        {
            background: #FFE0E9 url(../Images/reg3.gif) no-repeat 0 center;
            padding-left: 20px;
        }
        .onSuccess
        {
            background: #E9FBEB url(../Images/reg4.gif) no-repeat 0 center;
            padding-left: 20px;
        }
        .high
        {
            color: red;
        }
        .style1
        {
            width: 424px;
        }
        .style2
        {
            width: 205px;
        }
        .style3
        {
            width: 19%;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 100%" id="tab1">
         <td colspan="2">
                前台数据验证(1)
            </td>
            <tr>
                <td class="style3">
                    名字：
                </td>
                <td>
                    <input id="input1" type="text" required="true" />
                </td>
            </tr>
            <tr>
                <td class="style3">
                    年龄：
                </td>
                <td>
                    <input id="input2" type="text" datetype="digital" />
                </td>
            </tr>
        </table>
       <table style="width: 100%" id="tab2">
        <tr style="width:20%">
            <td colspan="2">
                前台数据验证(2)
            </td>
        </tr>       
        <tr>
            <td class="style2">
                必填:
            </td>
            <td class="style1">
                <asp:TextBox ID="txt1" runat="server" Width="170px" required="true"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                最大长度5:
            </td>
            <td class="style1">
                <asp:TextBox ID="txt2" runat="server" Width="170px" MaxLength="5"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Email格式:
            </td>
            <td class="style1">
                <asp:TextBox ID="txt3" runat="server" Width="170px" datatype="email"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                数字格式:
            </td>
            <td class="style1">
                <asp:TextBox ID="txt4" runat="server" Width="170px" datatype="digital"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                日期格式:
            </td>
            <td class="style1">
                <asp:TextBox ID="txt5" runat="server" Width="170px" datatype="date"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                邮编格式:
            </td>
            <td class="style1">
                <asp:TextBox ID="txt7" runat="server" Width="170px" datatype="zipcode"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                正整数:
            </td>
            <td class="style1">
                <asp:TextBox ID="txt6" runat="server" Width="170px" datatype="pinteger"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Url 格式:
            </td>
            <td class="style1">
                <asp:TextBox ID="TextBox1" runat="server" Width="170px" datatype="url"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                浮点数格式且保留N位小数:
            </td>
            <td class="style1">
                <asp:TextBox ID="TextBox2" runat="server" Width="170px" datatype="float,5"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                图片格式:
            </td>
            <td class="style1">
                <asp:FileUpload ID="FileUpload1" runat="server" Width="170px" datatype="photo" />
            </td>
        </tr>
        <tr>
            <td class="style2">
                含有特殊字符:
            </td>
            <td class="style1">
                <asp:TextBox ID="TextBox10" runat="server" Width="170px" datatype="special"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                为英文或英文和数字的组合:
            </td>
            <td class="style1">
                <asp:TextBox ID="TextBox4" runat="server" Width="170px" datatype="chinese"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                最大值为100:
            </td>
            <td class="style1">
                <asp:TextBox ID="TextBox5" runat="server" Width="170px" maxvalue="100"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                最小值为10:
            </td>
            <td class="style1">
                <asp:TextBox ID="TextBox6" runat="server" Width="170px" minvalue="10"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Button ID="Button1" Text="提交" runat="server" OnClientClick="return valid('tab2')"
            />
            </td>
        </tr>
    </table>       
    </div>
        
    </form>
</body>
</html>
